import javax.swing.*;
import java.awt.*;
import java.awt.event.*;


public class DrawPanel extends JPanel {

	Game game;
	
	public DrawPanel(Game game)
	{
		this.game = game;
		setPreferredSize(new Dimension(600,400));
		setBackground(Color.white);
	}
	
	
	public void paintComponent(Graphics g)
	{
		super.paintComponent(g);
		game.getPlayerOne().getTower().drawTower(g, 170,400);
		g.setColor(Color.black);
		g.drawString("Player One Ego: " + game.getPlayerOne().getCurrentEgo(),25,25);
		g.drawString("Player Two Ego: " + game.getPlayerTwo().getCurrentEgo(),450,25);
		
		g.drawString("Player One Deck: " + game.getPlayerOne().getDeck().getDrawCards().size(),25,50);
		g.drawString("Player Two Deck: " + game.getPlayerTwo().getDeck().getDrawCards().size(),450,50);
		
		g.drawString("Player One Tower: " + game.getPlayerOne().getTower().getHeight(),25,75);
		g.drawString("Player Two Tower: " + game.getPlayerTwo().getTower().getHeight(),450,75);
		
		g.drawString("Player One LC: " + game.getPlayerOne().getCharges().getCharge(ChargeWheel.chargeType.LOGIC),25,125);
		g.drawString("Player One EC: " + game.getPlayerOne().getCharges().getCharge(ChargeWheel.chargeType.ETHICS),25,150);
		g.drawString("Player One PC: " + game.getPlayerOne().getCharges().getCharge(ChargeWheel.chargeType.PASSION),25,175);
		g.drawString("Player One DC: " + game.getPlayerOne().getCharges().getCharge(ChargeWheel.chargeType.DECEPTION),25,200);
		
		g.drawString("Player Two LC: " + game.getPlayerTwo().getCharges().getCharge(ChargeWheel.chargeType.LOGIC),450,125);
		g.drawString("Player Two EC: " + game.getPlayerTwo().getCharges().getCharge(ChargeWheel.chargeType.ETHICS),450,150);
		g.drawString("Player Two PC: " + game.getPlayerTwo().getCharges().getCharge(ChargeWheel.chargeType.PASSION),450,175);
		g.drawString("Player Two DC: " + game.getPlayerTwo().getCharges().getCharge(ChargeWheel.chargeType.DECEPTION),450,200);
		
		game.getPlayerTwo().getTower().drawTower(g, 300,400);
	}
}

